const install = (Vue) => {
    const Bus = new Vue({
        methods: {
            emit(event, ...args) {
                this.$emit(event, ...args)
            },
            on(event, ...args) {
                this.$on(event, ...args)
            },
            off(event, ...args) {
                this.$off(event, ...args)
            }
        }
    })
    Vue.prototype.$bus = Bus
}

export default install

/**
 * 
     //订阅
     if (!this.$bus._events['workFlow-entrustSaveSuccess']) {
            this.$bus.on('workFlow-entrustSaveSuccess',() => {
                this.$refs.tableProductLine.findAllProject();
            });
     }

    //执行
    this.$bus.emit('workFlow-entrustSaveSuccess');
 * 
 */